AddMovieResource
TheAddMovieResource
function adds a movie resource to a specified resource file. Your application identifies the movie to be added to the movie file.
pascal OSErr AddMovieResource (Movie theMovie, short resRefNum, short *resId, const StringPtr resName);
theMovie
- Specifies the movie you wish to add to the movie file. Your application obtains this movie identifier from such functions as
NewMovie
,NewMovieFromFile
, andNewMovieFromHandle
(described on page 2-80, page 2-76, and page 2-78, respectively).resRefNum
- Identifies the movie file to which the resource is to be added. Your application obtains this value from the
OpenMovieFile
function, described on page 2-86. The movie file specified by this parameter cannot be a single-fork movie file.resId
- Contains a pointer to a field that contains the resource ID number for the new resource. If the field referred to by the
resId
parameter is set to 0, the Movie Toolbox assigns a unique resource ID number to the new resource. The toolbox then returns the movie's resource ID number in the field referred to by theresId
parameter. TheAddMovieResource
function assigns resource ID numbers sequentially, starting at 128. If theresId
parameter is set tonil
, the Movie Toolbox assigns a unique resource ID number to the new resource and does not return
that resource's ID value.resName
- Points to a character string that contains the name of the movie resource. If you set the
resName
parameter tonil
, the toolbox creates an unnamed resource.DESCRIPTION
TheAddMovieResource
function adds the movie to the file, effectively saving any changes you have made to the movie. This function does not work with single-fork movie files.After updating the movie file,
AddMovieResource
clears the movie changed flag, indicating that the movie has not been changed.ERROR CODES
File Manager errors
invalidMovie -2010 This movie is corrupted or invalid
Memory Manager errors
Resource Manager errors